import http from "./http.js";


//查询所有金刚区
export function centerDistrict(data) {
	return http.request({
			url: `/course/centerDistrict/listAll`,
			method: "get",
		},
		false
	);
}


//我的课程
export function qryChapterList(data) {
	return http.request({
			url: `/student/qryChapterList`,
			method: "get",
		},
		data,
		false
	);
}

//顶部搜索-搜索章节
export function searchChapterList(data) {
	return http.request({
			url: `/student/searchChapterList`,
			method: "get",
		},
		data,
		false
	);
}


//顶部筛选 查询年级列表
export function qryGrade(data) {
	return http.request({
			url: `/student/qryGrade`,
			method: "get",
		},
		data,
		false
	);
}

//顶部筛选 查询单元列表
export function listAll(data) {
	return http.request({
			url: `/course/unit/listAll`,
			method: "get",
		},
		data,
		false
	);
}


//顶部筛选 查询标签列表 
export function qryLabel(data) {
	return http.request({
			url: `/student/qryLabel`,
			method: "get",
		},
		data,
		false
	);
}


//搜索课程章节树
export function searchLessonChapterTree(data) {
	return http.request({
			url: `/student/searchLessonChapterTree`,
			method: "get",
		},
		data,
		false
	);
}


//章节详情-查询视频、图片、章节介绍 
export function viewChapter(data) {
	return http.request({
			url: `/student/viewChapter/${data.chapterId || data.jumpChapterId}`,
			method: "get",
		},
		data,
		false
	);
}


// 章节详情-目录
export function qryCatalogue(data) {
	return http.request({
			url: `/student/qryCatalogue`,
			method: "get",
		},
		data,
		false
	);
}

//查询章节的知识点
export function qryKnowledgePointByChapter(data) {
	return http.request({
			url: `/student/qryKnowledgePointByChapter`,
			method: "get",
		},
		data,
		false
	);
}

//查询张杰的知识点-不分页
export function qryKnowledgePointByChapterAll(data) {
	return http.request({
			url: `/student/qryKnowledgePointByChapterAll`,
			method: "get",
		},
		data,
		false
	);
}

//查询知识点的图片
export function viewKnowledgePointImg(data) {
	return http.request({
			url: `/student/viewKnowledgePointImg/${data.id}`,
			method: "get",
		},
		data,
		false
	);
}


//下载知识点
export function downloadKnowledgePoint(data) {
	return http.request({
			url: `/student/downloadKnowledgePoint/${data.id}`,
			method: "get",
		},
		data,
		false
	);
}



//保存知识点下载记录
export function saveDownloadLog(data) {
	return http.request({
			url: `/student/saveDownloadLog`,
			method: "post",
		},
		data,
		false
	);
}

//查询下载记录
export function qryDownloadLog(data) {
	return http.request({
			url: `/student/qryDownloadLog`,
			method: "get",
		},
		data,
		false
	);
}


//删除下载记录
export function deleteDownloadLog(data) {
	return http.request({
			url: `/student/removeDownloadLog/${data.ids}`,
			method: "delete",
		},
		false
	);
}


//保存观看记录
export function saveWatchRecord(data) {
	return http.request({
			url: `/student/saveWatchRecord`,
			method: "post",
		},
		data,
		false
	);
}

//章节详情-查询水印相关设置 
export function qryWatermark() {
	return http.request({
			url: `/course/configs/qryWatermark`,
			method: "post",
		},
		false
	);
}